﻿namespace OboutInc.ImageZoom
{
    using OboutInc.ImageZoom.Encryption;
    using OboutInc.ImageZoom.Enums;
    using System;
    using System.ComponentModel;
    using System.IO;
    using System.Reflection;
    using System.Runtime.CompilerServices;
    using System.Text;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Xml;

    [ToolboxItem(false)]
    public class ImageZoomEntry : Image
    {
        private int _backgroundOpacity;
        private string _bigImageUrl;
        private string _description;
        private ImageZoomEffects _effect;
        private bool _enableDiskCache;
        private OboutInc.ImageZoom.ImageZoom _imageZoom;
        private ScriptManagerHelper _izScriptManager;
        private int _numberOfFrames;
        private string _onBackgroundClick;
        private string _onBeforeBackgroundClick;
        private string _onBeforeBigImageClick;
        private string _onBeforeCloseButtonClick;
        private string _onBeforeImageClick;
        private string _onBeforeZoomIn;
        private string _onBeforeZoomOut;
        private string _onBigImageClick;
        private string _onCloseButtonClick;
        private string _onImageClick;
        private string _onZoomIn;
        private string _onZoomOut;
        private ImageZoomPositions _position;
        private int _relativeLeft;
        private int _relativeTop;
        private bool _showLoading;
        private string _style;
        private string _styleFolder;
        private int _thumbnailheight;
        private int _thumbnailwidth;
        private int _zIndex;
        private int _zoomTime;
        public static object CacheDir;
        public static bool EnableDiskCaching;
        private bool isFormedImageUrl;
        public static bool MultiMode;

        public ImageZoomEntry()
        {
            this._bigImageUrl = "";
            this._description = "";
            this._styleFolder = string.Empty;
            this._showLoading = true;
            this._effect = ImageZoomEffects.Zooming;
            this._zIndex = 0x3e8;
            this._backgroundOpacity = 0x19;
            this._zoomTime = 200;
            this._numberOfFrames = 15;
            this._onBeforeZoomIn = "";
            this._onBeforeZoomOut = "";
            this._onZoomIn = "";
            this._onZoomOut = "";
            this._onBeforeImageClick = "";
            this._onImageClick = "";
            this._onBeforeBigImageClick = "";
            this._onBigImageClick = "";
            this._onBeforeBackgroundClick = "";
            this._onBackgroundClick = "";
            this._onBeforeCloseButtonClick = "";
            this._onCloseButtonClick = "";
            this._thumbnailheight = 100;
            this._thumbnailwidth = 100;
        }

        public ImageZoomEntry(OboutInc.ImageZoom.ImageZoom iz)
        {
            this._bigImageUrl = "";
            this._description = "";
            this._styleFolder = string.Empty;
            this._showLoading = true;
            this._effect = ImageZoomEffects.Zooming;
            this._zIndex = 0x3e8;
            this._backgroundOpacity = 0x19;
            this._zoomTime = 200;
            this._numberOfFrames = 15;
            this._onBeforeZoomIn = "";
            this._onBeforeZoomOut = "";
            this._onZoomIn = "";
            this._onZoomOut = "";
            this._onBeforeImageClick = "";
            this._onImageClick = "";
            this._onBeforeBigImageClick = "";
            this._onBigImageClick = "";
            this._onBeforeBackgroundClick = "";
            this._onBackgroundClick = "";
            this._onBeforeCloseButtonClick = "";
            this._onCloseButtonClick = "";
            this._thumbnailheight = 100;
            this._thumbnailwidth = 100;
            this._imageZoom = iz;
        }

        private bool CheckAjaxPageInheritance()
        {
            Type baseType = this.Page.GetType().BaseType;
            while (baseType != null)
            {
                if (baseType.ToString() == "OboutInc.oboutAJAXPage")
                {
                    return true;
                }
                try
                {
                    baseType = Activator.CreateInstance(baseType).GetType().BaseType;
                    continue;
                }
                catch (Exception exception1)
                {
                    if (exception1 != null)
                    {
                    }
                    return false;
                }
            }
            return false;
        }

        private string GetImageDir(string imgUrl)
        {
            if (imgUrl.StartsWith("http://") || imgUrl.StartsWith("https://"))
            {
                this._imageZoom.IsPathAbsolute = true;
            }
            string cacheDirectory = "";
            if (this._imageZoom.IsPathAbsolute || this._imageZoom.IsImageStream)
            {
                if (string.IsNullOrEmpty(this._imageZoom.CacheDirectory) && this._imageZoom.EnableCacheDirectory)
                {
                    throw new Exception("Please set CacheDirectory when using absolute path as imageUrl");
                }
                if (this._imageZoom.EnableCacheDirectory)
                {
                    cacheDirectory = this._imageZoom.CacheDirectory;
                }
                return cacheDirectory;
            }
            if (!string.IsNullOrEmpty(imgUrl))
            {
                cacheDirectory = "";
                if (imgUrl.LastIndexOf('/') > 0)
                {
                    cacheDirectory = imgUrl.Substring(0, imgUrl.LastIndexOf('/'));
                }
            }
            return cacheDirectory;
        }

        protected override void OnInit(EventArgs e)
        {
            this._izScriptManager = new ScriptManagerHelper(this);
            base.OnInit(e);
        }

        protected override void OnLoad(EventArgs e)
        {
            if (!string.IsNullOrEmpty(this.Context.Request.QueryString["oboutizf"]))
            {
                ImageZoomImageFactory factory2 = new ImageZoomImageFactory {
                    IzhttpContext = this.Context
                };
                factory2.Draw();
                base.OnLoad(e);
            }
        }

        protected override void Render(HtmlTextWriter writer)
        {
            writer.Write(this.RenderImageZoom());
            bool flag = false;
            ScriptManagerHelper helper = new ScriptManagerHelper(this);
            if (!flag && !this._imageZoom.IsCallback)
            {
                if (!this.CheckAjaxPageInheritance())
                {
                    helper.RegisterStartupScript("izi_" + this.UniqueID, this.StartupScript(), true);
                    base.Render(writer);
                }
                else
                {
                    base.Render(writer);
                    writer.Write("<script type=\"text/javascript\">" + this.StartupScript() + "</script>");
                }
            }
            else
            {
                base.Render(writer);
            }
        }

        private string RenderImageZoom()
        {
            string newValue = "{BigImage}";
            string innerXml = "Loading...";
            string str3 = "";
            string str4 = "";
            XmlDocument document = new XmlDocument();
            try
            {
                if (string.IsNullOrEmpty(this._style))
                {
                    this.SetStyle();
                }
                document.Load(this.Page.Server.MapPath(this.StyleFolder + "/" + this._style + ".xml"));
            }
            catch (Exception exception1)
            {
                if (exception1 != null)
                {
                }
                Stream manifestResourceStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("OboutInc.ImageZoom.Resources.style.style.xml");
                if (manifestResourceStream != null)
                {
                    StreamReader txtReader = new StreamReader(manifestResourceStream);
                    document.Load(txtReader);
                }
            }
            try
            {
                newValue = document.GetElementsByTagName("zoompanel")[0].InnerXml;
            }
            catch (Exception exception6)
            {
                if (exception6 != null)
                {
                }
            }
            try
            {
                innerXml = document.GetElementsByTagName("loading")[0].InnerXml;
            }
            catch (Exception exception7)
            {
                if (exception7 != null)
                {
                }
            }
            try
            {
                str3 = document.GetElementsByTagName("background")[0].InnerXml;
            }
            catch (Exception exception8)
            {
                if (exception8 != null)
                {
                }
            }
            try
            {
                str4 = document.GetElementsByTagName("effectpanel")[0].InnerXml;
            }
            catch (Exception exception9)
            {
                if (exception9 != null)
                {
                }
            }
            string str5 = "<div id='{id}.loading' class='oizLoading' style='position:absolute;display:none;z-index:{zIndex};'>{tpl_loading}</div>".Replace("{id}", this.ClientID).Replace("{tpl_loading}", innerXml).Replace("{zIndex}", this.zIndex.ToString());
            int num2 = this.zIndex + 1;
            string str6 = "<div id='{id}.background' class='oizBackground' style='display:none;z-index:{zIndex};'>{tpl_background}</div>".Replace("{id}", this.ClientID).Replace("{tpl_background}", str3).Replace("{zIndex}", num2.ToString());
            int num3 = this.zIndex + 2;
            string str7 = "<div id='{id}.effectpanel' class='oizEffectPanel' style='display:none;position:absolute;z-index:{zIndex};'>{tpl_effectpanel}</div>".Replace("{id}", this.ClientID).Replace("{tpl_effectpanel}", str4).Replace("{zIndex}", num3.ToString());
            int num4 = this.zIndex + 3;
            string str8 = "<img id='{id}.effectimage' class='oizEffectImage' style='display:none;position:absolute;z-index:{zIndex};' alt=''/>".Replace("{id}", this.ClientID).Replace("{zIndex}", num4.ToString());
            string str9 = "<a class='oizNextLink' onfocus='this.blur();' id='{id}.oizNextLink' href='#' Title='Next'><span>Next</span></a>".Replace("{id}", this.ClientID);
            string str10 = "<a class='oizPrevLink' onfocus='this.blur();' id='{id}.oizPrevLink' href='#' Title='Previous'><span>Previous</span></a>".Replace("{id}", this.ClientID);
            int num5 = this.zIndex + 5;
            string str11 = "<div id='{id}.nextprev' class='oizNextPrev' style='position:absolute;z-index:{zIndex};display:none;width:100%;height:100%'>{zprevbuttons}{znextbuttons}</div>".Replace("{id}", this.ClientID.Trim()).Replace("{zIndex}", num5.ToString()).Replace("{zprevbuttons}", str10).Replace("{znextbuttons}", str9);
            int num6 = this.zIndex + 3;
            string str12 = "<img id='{id}.bigimage' class='oizBigImage' alt='' style='z-index:{zIndex};'/>".Replace("{id}", this.ClientID).Replace("{zIndex}", num6.ToString());
            string str13 = "<div id='{id}.zoompanel' class='oizZoomPanel' style='display:none;z-index:{zIndex};'>{tpl_zoompanel}{nextprevpanel}</div>".Replace("{id}", this.ClientID).Replace("{tpl_zoompanel}", newValue).Replace("{BigImage}", str12);
            if (!string.IsNullOrEmpty(this.Description))
            {
                string str14 = "<span class='oizDescription'>{description}</span>".Replace("{description}", this.Description);
                str13 = str13.Replace("{Description}", str14);
            }
            else
            {
                str13 = str13.Replace("{Description}", string.Empty);
            }
            int num7 = this.zIndex + 4;
            str13 = str13.Replace("{CloseButton}", "<a class='oizCloseButton'> </a>").Replace("{MoveButton}", "<a class='oizMoveButton'> </a>").Replace("{nextprevpanel}", str11).Replace("{zIndex}", num7.ToString());
            if (string.IsNullOrEmpty(this._style))
            {
                this.SetStyle();
            }
            return "<div id='{id}.container' class='{style}OIZ' style='display:inline;'>{loading}{background}{effectpanel}{effectimage}{zoompanel}</div>".Replace("{id}", this.ClientID).Replace("{style}", this._style).Replace("{zoompanel}", str13).Replace("{loading}", str5).Replace("{background}", (this.BackgroundOpacity > 0) ? str6 : "").Replace("{effectpanel}", str7).Replace("{effectimage}", str8);
        }

        public void RenderInDesign(HtmlTextWriter writer)
        {
            base.Render(writer);
        }

        private void SetCacheDir(string imageDir)
        {
            if (this._imageZoom.EnableCacheDirectory)
            {
                DirectoryInfo info = new DirectoryInfo(this.Context.Server.MapPath(imageDir) + "/IZ_cache");
                if (!info.Exists)
                {
                    try
                    {
                        Directory.CreateDirectory(this.Context.Server.MapPath(imageDir) + "/IZ_cache");
                    }
                    catch (Exception)
                    {
                        throw new Exception("The image folder should have write permission to create CacheDirectory or set EnableCacheDirectory=\"false\"");
                    }
                }
            }
        }

        private void SetStyle()
        {
            if (this.StyleFolder != string.Empty)
            {
                string[] strArray = this.StyleFolder.Split(new char[] { '/' });
                this._style = strArray[strArray.Length - 1];
            }
            else
            {
                this._style = "simple";
            }
        }

        internal string StartupScript()
        {
            string clientID = this.ClientID;
            StringBuilder builder = new StringBuilder();
            if (OboutInc.ImageZoom.ImageZoom.GridPageIndex == "1")
            {
                builder.Append(" if(typeof(" + clientID + ")!='undefined'){if(typeof(" + clientID + ".destruct)=='function'){" + clientID + ".destruct();}}");
            }
            string str2 = "window.{id} = new ImageZoom('{idorg}','{id}','{BigImageUrl}',{showLoading},{BackgroundOpacity},'{Effect}','{StyleFolder}','{Position}',{RelativeTop},{RelativeLeft},{ZoomTime},{NumberOfFrames},'{isCallback}');";
            string str3 = "{id}.registerEvent('{eventname}',{eventhandle});";
            string str4 = str2.Replace("{id}", clientID).Replace("{idorg}", this.ID).Replace("{BigImageUrl}", this.BigImageUrl).Replace("{showLoading}", this.ShowLoading ? "1" : "0").Replace("{BackgroundOpacity}", this.BackgroundOpacity.ToString()).Replace("{Effect}", this._imageZoom.Effect.ToString()).Replace("{StyleFolder}", this.StyleFolder).Replace("{Position}", this._imageZoom.Position.ToString()).Replace("{RelativeTop}", this._imageZoom.RelativeTop.ToString()).Replace("{RelativeLeft}", this._imageZoom.RelativeLeft.ToString()).Replace("{ZoomTime}", this._imageZoom.ZoomTime.ToString()).Replace("{NumberOfFrames}", this._imageZoom.NumberOfFrames.ToString()).Replace("{isCallback}", this._imageZoom.IsCallback.ToString());
            if (this.OnBeforeZoomIn != "")
            {
                string str5 = str3.Replace("{id}", clientID).Replace("{eventname}", "OnBeforeZoomIn").Replace("{eventhandle}", this._imageZoom.OnBeforeZoomIn);
                str4 = str4 + str5;
            }
            if (this.OnBeforeZoomOut != "")
            {
                string str6 = str3.Replace("{id}", clientID).Replace("{eventname}", "OnBeforeZoomOut").Replace("{eventhandle}", this._imageZoom.OnBeforeZoomOut);
                str4 = str4 + str6;
            }
            if (this.OnZoomIn != "")
            {
                string str7 = str3.Replace("{id}", clientID).Replace("{eventname}", "OnZoomIn").Replace("{eventhandle}", this._imageZoom.OnZoomIn);
                str4 = str4 + str7;
            }
            if (this.OnZoomOut != "")
            {
                string str8 = str3.Replace("{id}", clientID).Replace("{eventname}", "OnZoomOut").Replace("{eventhandle}", this._imageZoom.OnZoomOut);
                str4 = str4 + str8;
            }
            if (this.OnImageClick != "")
            {
                string str9 = str3.Replace("{id}", clientID).Replace("{eventname}", "OnImageClick").Replace("{eventhandle}", this._imageZoom.OnImageClick);
                str4 = str4 + str9;
            }
            if (this.OnBeforeImageClick != "")
            {
                string str10 = str3.Replace("{id}", clientID).Replace("{eventname}", "OnBeforeImageClick").Replace("{eventhandle}", this._imageZoom.OnBeforeImageClick);
                str4 = str4 + str10;
            }
            if (this.OnBigImageClick != "")
            {
                string str11 = str3.Replace("{id}", clientID).Replace("{eventname}", "OnBigImageClick").Replace("{eventhandle}", this._imageZoom.OnBigImageClick);
                str4 = str4 + str11;
            }
            if (this.OnBeforeBigImageClick != "")
            {
                string str12 = str3.Replace("{id}", clientID).Replace("{eventname}", "OnBeforeBigImageClick").Replace("{eventhandle}", this._imageZoom.OnBeforeBigImageClick);
                str4 = str4 + str12;
            }
            if (this.OnBackgroundClick != "")
            {
                string str13 = str3.Replace("{id}", clientID).Replace("{eventname}", "OnBackgroundClick").Replace("{eventhandle}", this._imageZoom.OnBackgroundClick);
                str4 = str4 + str13;
            }
            if (this.OnBeforeBackgroundClick != "")
            {
                string str14 = str3.Replace("{id}", clientID).Replace("{eventname}", "OnBeforeBackgroundClick").Replace("{eventhandle}", this._imageZoom.OnBeforeBackgroundClick);
                str4 = str4 + str14;
            }
            if (this.OnCloseButtonClick != "")
            {
                string str15 = str3.Replace("{id}", clientID).Replace("{eventname}", "OnCloseButtonClick").Replace("{eventhandle}", this._imageZoom.OnCloseButtonClick);
                str4 = str4 + str15;
            }
            if (this.OnBeforeCloseButtonClick != "")
            {
                string str16 = str3.Replace("{id}", clientID).Replace("{eventname}", "OnBeforeCloseButtonClick").Replace("{eventhandle}", this._imageZoom.OnBeforeCloseButtonClick);
                str4 = str4 + str16;
            }
            builder.Append(str4);
            return builder.ToString();
        }

        public override string AlternateText
        {
            get
            {
                return base.AlternateText;
            }
            set
            {
                base.AlternateText = value;
            }
        }

        [Description(" Gets or sets opacity of background")]
        public int BackgroundOpacity
        {
            get
            {
                return this._backgroundOpacity;
            }
            set
            {
                this._backgroundOpacity = value;
            }
        }

        [Description("Gets or sets the big image url")]
        internal string BigImageUrl
        {
            get
            {
                string str = this._bigImageUrl;
                int bigImageWidth = 0;
                int bigImageHeight = 0;
                if (this._imageZoom.BigImageSize == BigImageSize.Custom)
                {
                    bigImageWidth = this._imageZoom.BigImageWidth;
                    bigImageHeight = this._imageZoom.BigImageHeight;
                }
                if (!string.IsNullOrEmpty(str) && (this._imageZoom.ShowWaterMark || (this._imageZoom.BigImageSize == BigImageSize.Custom)))
                {
                    string str2 = OboutInc.ImageZoom.Encryption.Encryption.Base64Encode(string.Format("f={0}&h={1}&w={2}&rd={3}&big={4}&wm={5}&chf={6}", new object[] { OboutInc.ImageZoom.Encryption.Encryption.Base64Encode(str), bigImageHeight, bigImageWidth, false, true, this._imageZoom.WatermarkText, "" }));
                    switch (this._imageZoom.RenderingMode)
                    {
                        case RenderingModes.Default:
                            str = string.Format("{0}oboutizf={1}", (this.Context.Request.RawUrl.IndexOf("?") >= 0) ? (this.Context.Request.RawUrl + "&") : (this.Context.Request.RawUrl + "?"), str2);
                            break;

                        case RenderingModes.HttpHandler:
                            if (this._imageZoom.HttpHandlerName != null)
                            {
                                str = string.Format("{0}?oboutizf={1}", this._imageZoom.HttpHandlerName, str2);
                            }
                            break;
                    }
                }
                return (str.StartsWith("~") ? base.ResolveUrl(str) : str);
            }
            set
            {
                if (this._bigImageUrl == "")
                {
                    string relativeUrl = value;
                    if (relativeUrl.IndexOf("~") == 0)
                    {
                        relativeUrl = base.ResolveUrl(relativeUrl);
                    }
                    this._bigImageUrl = relativeUrl;
                }
            }
        }

        [Description(" Gets or sets image description which will be shown in zooming panel")]
        public string Description
        {
            get
            {
                return this._description;
            }
            set
            {
                this._description = value;
            }
        }

        [Description(" Gets or sets effect.")]
        public ImageZoomEffects Effect
        {
            get
            {
                return this._effect;
            }
            set
            {
                this._effect = value;
            }
        }

        [Description("Image in bynary format"), Bindable(true), Category("Appearance")]
        public object ImageStream { get; set; }

        [Description("Get or Sets the ImageUrl")]
        public override string ImageUrl
        {
            get
            {
                if (!this.isFormedImageUrl)
                {
                    string imageUrl = base.ImageUrl;
                    if (imageUrl.IndexOf("~") == 0)
                    {
                        imageUrl = base.ResolveUrl(imageUrl);
                    }
                    string imageDir = this.GetImageDir(imageUrl);
                    this.SetCacheDir(imageDir);
                    string str3 = "ob_" + DateTime.Now.Ticks;
                    string str4 = string.Empty;
                    bool flag = this.ImageStream != null;
                    if (flag)
                    {
                        this.Context.Cache[str3] = this.ImageStream;
                    }
                    string str5 = OboutInc.ImageZoom.Encryption.Encryption.Base64Encode(string.Format("f={0}&h={1}&w={2}&rd={3}&big={4}&wm={5}&chf={6}&chk={7}&strm={8}&clr={9}&ff={10}&fz={11}&fs={12}", new object[] { OboutInc.ImageZoom.Encryption.Encryption.Base64Encode(imageUrl), this._thumbnailheight, this._thumbnailwidth, this._imageZoom.EnableCacheDirectory, false, this._imageZoom.ThumbnailWatermark ? this.Description : "", CacheDir, str3, flag, this._imageZoom.ThumbnailWatermarkColor.Name, this._imageZoom.ThumbnailWatermarkFontFamily, this._imageZoom.ThumbnailWatermarkFontSize.ToString(), this._imageZoom.ThumbnailWatermarkFontStyle.ToString() }));
                    switch (this._imageZoom.RenderingMode)
                    {
                        case RenderingModes.Default:
                            str4 = string.Format("{0}oboutizf={1}", (this.Context.Request.RawUrl.IndexOf("?") >= 0) ? (this.Context.Request.RawUrl + "&") : (this.Context.Request.RawUrl + "?"), str5);
                            break;

                        case RenderingModes.HttpHandler:
                            if (this._imageZoom.HttpHandlerName != null)
                            {
                                str4 = string.Format("{0}?oboutizf={1}", this._imageZoom.HttpHandlerName, str5);
                            }
                            break;
                    }
                    base.ImageUrl = str4;
                    this.isFormedImageUrl = true;
                }
                return base.ImageUrl;
            }
            set
            {
                base.ImageUrl = value;
                this.isFormedImageUrl = false;
            }
        }

        [Description(" Gets or sets number of frame render")]
        public int NumberOfFrames
        {
            get
            {
                return this._numberOfFrames;
            }
            set
            {
                this._numberOfFrames = value;
            }
        }

        [Description(" Gets or sets client-side event handle")]
        public string OnBackgroundClick
        {
            get
            {
                return this._onBackgroundClick;
            }
            set
            {
                this._onBackgroundClick = value;
            }
        }

        [Description(" Gets or sets client-side event handle")]
        public string OnBeforeBackgroundClick
        {
            get
            {
                return this._onBeforeBackgroundClick;
            }
            set
            {
                this._onBeforeBackgroundClick = value;
            }
        }

        [Description(" Gets or sets client-side event handle")]
        public string OnBeforeBigImageClick
        {
            get
            {
                return this._onBeforeBigImageClick;
            }
            set
            {
                this._onBeforeBigImageClick = value;
            }
        }

        [Description(" Gets or sets client-side event handle")]
        public string OnBeforeCloseButtonClick
        {
            get
            {
                return this._onBeforeCloseButtonClick;
            }
            set
            {
                this._onBeforeCloseButtonClick = value;
            }
        }

        [Description(" Gets or sets client-side event handle")]
        public string OnBeforeImageClick
        {
            get
            {
                return this._onBeforeImageClick;
            }
            set
            {
                this._onBeforeImageClick = value;
            }
        }

        [Description(" Gets or sets client-side event handle")]
        public string OnBeforeZoomIn
        {
            get
            {
                return this._onBeforeZoomIn;
            }
            set
            {
                this._onBeforeZoomIn = value;
            }
        }

        [Description(" Gets or sets client-side event handle")]
        public string OnBeforeZoomOut
        {
            get
            {
                return this._onBeforeZoomOut;
            }
            set
            {
                this._onBeforeZoomOut = value;
            }
        }

        [Description(" Gets or sets client-side event handle")]
        public string OnBigImageClick
        {
            get
            {
                return this._onBigImageClick;
            }
            set
            {
                this._onBigImageClick = value;
            }
        }

        [Description(" Gets or sets client-side event handle")]
        public string OnCloseButtonClick
        {
            get
            {
                return this._onCloseButtonClick;
            }
            set
            {
                this._onCloseButtonClick = value;
            }
        }

        [Description(" Gets or sets client-side event handle")]
        public string OnImageClick
        {
            get
            {
                return this._onImageClick;
            }
            set
            {
                this._onImageClick = value;
            }
        }

        [Description(" Gets or sets client-side event handle")]
        public string OnZoomIn
        {
            get
            {
                return this._onZoomIn;
            }
            set
            {
                this._onZoomIn = value;
            }
        }

        [Description(" Gets or sets client-side event handle")]
        public string OnZoomOut
        {
            get
            {
                return this._onZoomOut;
            }
            set
            {
                this._onZoomOut = value;
            }
        }

        [Description(" Gets or sets position.")]
        public ImageZoomPositions Position
        {
            get
            {
                return this._position;
            }
            set
            {
                this._position = value;
            }
        }

        [Description(" Gets or sets relative left of imagezoom")]
        public int RelativeLeft
        {
            get
            {
                return this._relativeLeft;
            }
            set
            {
                this._relativeLeft = value;
            }
        }

        [Description(" Gets or sets relative top of imagezoom")]
        public int RelativeTop
        {
            get
            {
                return this._relativeTop;
            }
            set
            {
                this._relativeTop = value;
            }
        }

        [Description(" Gets or sets whether loading will be shown while image is being loaded.")]
        public bool ShowLoading
        {
            get
            {
                return this._showLoading;
            }
            set
            {
                this._showLoading = value;
            }
        }

        [Description("Gets or sets style folder")]
        public string StyleFolder
        {
            get
            {
                return this._styleFolder;
            }
            set
            {
                this._styleFolder = value;
            }
        }

        public int ThumnailHeight
        {
            get
            {
                return this._thumbnailheight;
            }
            set
            {
                this._thumbnailheight = value;
            }
        }

        public int Thumnailwidth
        {
            get
            {
                return this._thumbnailwidth;
            }
            set
            {
                this._thumbnailwidth = value;
            }
        }

        [Description(" Gets or sets z-index of zoom image")]
        public int zIndex
        {
            get
            {
                return this._zIndex;
            }
            set
            {
                this._zIndex = value;
            }
        }

        [Description(" Gets or sets zooming time")]
        public int ZoomTime
        {
            get
            {
                return this._zoomTime;
            }
            set
            {
                this._zoomTime = value;
            }
        }
    }
}

